package com.vitabuybuy.tv.dto;

import com.vitabuybuy.tv.utils.LanaugeUtils;

import java.util.List;

/**
 * 作者：SimGa
 * 日期：2020/12/14
 * 时间：16:49
 * 包名：com.vitabuybuy.tv.dto
 */
public class SettlementDto {

    public double getPlatformDiscountAmount() {
        return platformDiscountAmount;
    }

    public void setPlatformDiscountAmount(double platformDiscountAmount) {
        this.platformDiscountAmount = platformDiscountAmount;
    }

    private double platformDiscountAmount;
    private double goodsAmount;
    private double paymentAmount;
    private int goodsQuantity;
    /**
     * goodsAmount : 300.0
     * name : 李艺科潮男装卖店
     * goodsQuantity : 3
     * itemList : [{"amount":100,"product":{"thumbnail":"http://106.55.47.138/attachment/jpg/1359/759_13779.jpg","name":"{\"EN\":\"nikedunk\",\"CN\":\"nikedunk\",\"MA\":\"nikedunk\"}","id":61},"quantity":3,"price":100,"goods":{"id":275},"id":135,"specifications":"{\"EN\":\"coffee\",\"CN\":\"咖啡色\",\"MA\":\"coffee\"}"}]
     * id : 12
     */

    private List<StoreListBean> storeList;

    public double getPaymentAmount() {
        return paymentAmount;
    }

    public void setPaymentAmount(double paymentAmount) {
        this.paymentAmount = paymentAmount;
    }

    public double getGoodsAmount() {
        return goodsAmount;
    }

    public void setGoodsAmount(double goodsAmount) {
        this.goodsAmount = goodsAmount;
    }

    public int getGoodsQuantity() {
        return goodsQuantity;
    }

    public void setGoodsQuantity(int goodsQuantity) {
        this.goodsQuantity = goodsQuantity;
    }

    public List<StoreListBean> getStoreList() {
        return storeList;
    }

    public void setStoreList(List<StoreListBean> storeList) {
        this.storeList = storeList;
    }

    public static class StoreListBean {
//        private CouponCenterDto couponCenterDto;
//
//        public CouponCenterDto getCouponCenterDto() {
//            return couponCenterDto;
//        }
//
//        public void setCouponCenterDto(CouponCenterDto couponCenterDto) {
//            this.couponCenterDto = couponCenterDto;
//        }

        private double discountAmount;
        private double goodsAmount;
        private String name;
        private int goodsQuantity;
        private int id;

        public double getDiscountAmount() {
            return discountAmount;
        }

        public void setDiscountAmount(double discountAmount) {
            this.discountAmount = discountAmount;
        }

        /**
         * amount : 100.0
         * product : {"thumbnail":"http://106.55.47.138/attachment/jpg/1359/759_13779.jpg","name":"{\"EN\":\"nikedunk\",\"CN\":\"nikedunk\",\"MA\":\"nikedunk\"}","id":61}
         * quantity : 3
         * price : 100.0
         * goods : {"id":275}
         * id : 135
         * specifications : {"EN":"coffee","CN":"咖啡色","MA":"coffee"}
         */

        private List<ItemListBean> itemList;

        public double getGoodsAmount() {
            return goodsAmount;
        }

        public void setGoodsAmount(double goodsAmount) {
            this.goodsAmount = goodsAmount;
        }

        public String getName() {
            return LanaugeUtils.returnStrByLocation(name);
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getGoodsQuantity() {
            return goodsQuantity;
        }

        public void setGoodsQuantity(int goodsQuantity) {
            this.goodsQuantity = goodsQuantity;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public List<ItemListBean> getItemList() {
            return itemList;
        }

        public void setItemList(List<ItemListBean> itemList) {
            this.itemList = itemList;
        }

        public static class ItemListBean {
            private double amount;
            /**
             * thumbnail : http://106.55.47.138/attachment/jpg/1359/759_13779.jpg
             * name : {"EN":"nikedunk","CN":"nikedunk","MA":"nikedunk"}
             * id : 61
             */

            private ProductBean product;
            private int quantity;
            private double price;
            /**
             * id : 275
             */

            private GoodsBean goods;
            private int id;
            private String specifications;

            public double getAmount() {
                return amount;
            }

            public void setAmount(double amount) {
                this.amount = amount;
            }

            public ProductBean getProduct() {
                return product;
            }

            public void setProduct(ProductBean product) {
                this.product = product;
            }

            public int getQuantity() {
                return quantity;
            }

            public void setQuantity(int quantity) {
                this.quantity = quantity;
            }

            public double getPrice() {
                return price;
            }

            public void setPrice(double price) {
                this.price = price;
            }

            public GoodsBean getGoods() {
                return goods;
            }

            public void setGoods(GoodsBean goods) {
                this.goods = goods;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getSpecifications() {
                String[] split = specifications.split(";");
                specifications = "";
                for(String spec : split){
                    String str = LanaugeUtils.returnStrByLocation(spec);
                    specifications = specifications.concat(str).concat(";");
                }
                return specifications.isEmpty() ? specifications : specifications.substring(0,specifications.length() - 1);

            }

            public void setSpecifications(String specifications) {
                this.specifications = specifications;
            }

            public static class ProductBean {
                private String thumbnail;
                private String name;
                private int id;

                public String getThumbnail() {
                    return thumbnail;
                }

                public void setThumbnail(String thumbnail) {
                    this.thumbnail = thumbnail;
                }

                public String getName() {
                    return LanaugeUtils.returnStrByLocation(name);
                }

                public void setName(String name) {
                    this.name = name;
                }

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }
            }

            public static class GoodsBean {
                private int id;
                private String image;

                public String getImage() {
                    return image;
                }

                public void setImage(String image) {
                    this.image = image;
                }

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }
            }
        }
    }
}
